

import pandas as pd
import numpy as np
import joblib


#zzPkl = "D:/yrProj/202406zhongan/青禾苗-模型文件/银融_青禾苗_三版模型/银融_青禾苗_模型_子分1.1.dat"
#pxOutPath = "./zzPx"

#zzPkl = "D:/yrProj/hengchang202407/样本/fits/hc_y1.pkl"
#pxOutPath = "./y1Px"

#zzPkl = "D:/yrProj/hengchang202407/样本/fits/hc_y2.pkl"
#pxOutPath = "./y2Px"

#zzPkl = "D:/yrProj/hengchang202407/样本/fits/hc_y3.pkl"
#pxOutPath = "./y3Px"

zzPkl = "D:/yrProj/202407_海尔消金/银融_百度云_w21_f2pd_部署包/joblib_银融_w21_f2pd_B-a0904.pkl"
pxOutPath = "./hrPx"



zzLm = joblib.load(zzPkl)

print(zzLm)

pdPtn = pd.read_csv("./子分V1.1测试结果_20241210.csv")
print(pdPtn)
print(pdPtn.columns.tolist())
# [23143 rows x 269 columns]
# ['mob_hash1', 'certno_hash1', 'apply_date1', 'id', 'mob_hash', 'certno_hash', 'apply_date', 'S01_


vQhmFeats = []
for line in open("D:/yrProj/202406zhongan/青禾苗-模型文件/银融_青禾苗_三版模型/银融_青禾苗_入模特征_子分1.1.txt"):
  line = line.strip()
  vQhmFeats.append(line)
print(vQhmFeats)
print(len(vQhmFeats))


zzLmPx = zzLm.predict_proba(pdPtn[vQhmFeats])[:,1]
vZzLmPx = zzLmPx.tolist()
print(len(vZzLmPx))
fO1 = open(pxOutPath, "w")
for px in vZzLmPx:
  fO1.write(str(round(px,8)) + "\n")
fO1.close()

